<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/hlht/hlhtTenantOpenPile.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<br>' +
            '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>互联互通</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>桩</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

    var has_add = '';
    var has_edit = '';
    var has_delete = '';
</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="row">
                    <input id="tenantOpenId" name="tenantOpenId" value="${tenantOpenId}" type="hidden">
                    <input id="elecStationId" name="elecStationId" value="${elecStationId}" type="hidden">
                    <input id="hlhtTenantCode" name="hlhtTenantCode" value="${hlhtTenantCode}" type="hidden">
                    <input id="hlhtOperatorId" name="hlhtOperatorId" value="${hlhtOperatorId}" type="hidden">
                    <input id="hlhtOpenType" name="hlhtOpenType" value="${hlhtOpenType}" type="hidden">
                    <div class="pull-left search col-md-2">
                        <input id="pileName" name="pileName" type="text" class="form-control"
                               placeholder="充电设备名称">
                    </div>
                    <div class="pull-left search col-md-2">
                        <select class="form-control" id="pileType" name="pileType">
                            <option value="">设备类型</option>
                            <option value="1">直流设备</option>
                            <option value="2">交流设备</option>
                        </select>
                    </div>
                    <div class="pull-left search col-md-2">
                        <select class="form-control" id="isOpen" name="isOpen">
                            <option value="" selected>是否开放</option>
                            <option value="0" >否</option>
                            <option value="1" >是</option>
                        </select>
                    </div>
                    <div class="pull-left search col-md-2">
                        <select class="form-control" id="epHlhtOpenforType" style="width: 100% !important;" name="epHlhtOpenforType">
                            <option value="">是否支持向第三方开放</option>
                            <option value="0">是</option>
                            <option value="1">否</option>
                        </select>
                    </div>
                    <div class="pull-left search col-md-1">
                        <button class="btn btn-success" onclick="hlhtTenantOpenPile.reLoad()">查询</button>
                    </div>

                    <div class="pull-left search col-md-1">
                        <button type="button" class="btn btn-primary"
                                onclick="hlhtTenantOpenPile.batchHandleRows()">
                           开放设置
                        </button>
                    </div>
                    <form class='layui-form' id="open-main" style="display: none">
                        <div class='form-horizontal layui-form' style='width:100%;padding:10px;text-align: left'>
                            <div style='border-bottom: 0.5px solid #ccc;padding-bottom: 20px'>
                                <h1 style='font-size: 16px;color: #000'>是否向对方开放</h1>
                                <div style='font-size: 12px;margin: 5px 0'>（tips :选择'是'，则将站点开放给对方进行运营。反之，不开放）</div>
                                <input type='radio' class='form-control' lay-filter='openStatus' name='openStatus' title='是' checked value='0'>
                                <input type='radio' class='form-control' lay-filter='openStatus' name='openStatus' title='否' value='1'>
                            </div>
                            <div style='padding-top: 20px'><h1 style='font-size: 16px;color: #000'>是否支持对方向第三方开放</h1>
                                <div style='font-size: 12px;margin: 5px 0'>（tips:选择'是'，则将站点开放给对方进行运营。反之，不开放）</div>
                                <input type='radio' name='epHlhtOpenforType' checked value='0' title='是'>
                                <input type='radio' name='epHlhtOpenforType' value='1' title='否'>
                            </div>
                        </div>
                    </form>
                    <table id="exampleTable" data-mobile-responsive="true">
                    </table>
                </div>
                </table>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    layui.use('laydate', function () {
        var laydate = layui.laydate;
        var startTime = laydate.render({
            elem: '#beginDate',

            type: 'datetime',
            format: 'yyyy-MM-dd HH:mm:ss',
            trigger: 'click',
            done: function (value, dates) {
                endTime.config.min = {
                    year: dates.year,
                    month: dates.month - 1, //关键
                    date: dates.date,
                    hours: 0,
                    minutes: 0,
                    seconds: 0
                };
            }
        });
        var endTime = laydate.render({
            elem: '#endDate',
            type: 'datetime',
            format: 'yyyy-MM-dd HH:mm:ss',
            trigger: 'click'
        });

    });
    hlhtTenantOpenPile.init();
</script>
</body>
</html>
<script>
    layui.use(['form', 'jquery', 'tree', 'laydate', 'util'], function () {
        // var form = layui.form;
        // var $ = layui.jquery;
    });
</script>